home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / dpdlg / frmmain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-07-12  |  7.0 KB  |  236 lines

  1. VERSION 5.00
  2. Object = "{BE5AB243-F888-11D0-9F5E-B42103C10710}#1.0#0"; "DPDLG.OCX"
  3. Begin VB.Form frmMain 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Directory Picker Example"
  6.    ClientHeight    =   3504
  7.    ClientLeft      =   36
  8.    ClientTop       =   336
  9.    ClientWidth     =   7164
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   3504
  14.    ScaleWidth      =   7164
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin VB.ComboBox cmboRoot 
  18.       Height          =   288
  19.       ItemData        =   "frmMain.frx":0000
  20.       Left            =   5040
  21.       List            =   "frmMain.frx":002E
  22.       Style           =   2  'Dropdown List
  23.       TabIndex        =   13
  24.       Top             =   2400
  25.       Width           =   2052
  26.    End
  27.    Begin VB.TextBox txtCaption 
  28.       Height          =   288
  29.       Left            =   960
  30.       TabIndex        =   11
  31.       Top             =   240
  32.       Width           =   4692
  33.    End
  34.    Begin VB.CommandButton cmdClose 
  35.       Cancel          =   -1  'True
  36.       Caption         =   "Close"
  37.       Height          =   372
  38.       Left            =   5880
  39.       TabIndex        =   10
  40.       Top             =   720
  41.       Width           =   1092
  42.    End
  43.    Begin VB.CheckBox chkROFSD 
  44.       Caption         =   "Return Only File System D&irs"
  45.       Height          =   252
  46.       Left            =   120
  47.       TabIndex        =   9
  48.       Top             =   3000
  49.       Width           =   3852
  50.    End
  51.    Begin VB.CheckBox chkRFSA 
  52.       Caption         =   "Return File System &Ancestors"
  53.       Height          =   252
  54.       Left            =   120
  55.       TabIndex        =   8
  56.       Top             =   2640
  57.       Width           =   3852
  58.    End
  59.    Begin VB.CheckBox chkDGBD 
  60.       Caption         =   "Don't Go Below &Domain"
  61.       Height          =   252
  62.       Left            =   120
  63.       TabIndex        =   7
  64.       Top             =   2280
  65.       Width           =   3852
  66.    End
  67.    Begin VB.CheckBox chkBFP 
  68.       Caption         =   "Browse For &Printer"
  69.       Height          =   252
  70.       Left            =   120
  71.       TabIndex        =   6
  72.       Top             =   1920
  73.       Width           =   3852
  74.    End
  75.    Begin VB.CheckBox chkBFC 
  76.       Caption         =   "Browse For &Computer"
  77.       Height          =   252
  78.       Left            =   120
  79.       TabIndex        =   5
  80.       Top             =   1560
  81.       Width           =   3852
  82.    End
  83.    Begin VB.CommandButton cmdShow 
  84.       Caption         =   "Show..."
  85.       Default         =   -1  'True
  86.       Height          =   372
  87.       Left            =   5880
  88.       TabIndex        =   4
  89.       Top             =   240
  90.       Width           =   1092
  91.    End
  92.    Begin VB.TextBox txtPath 
  93.       Enabled         =   0   'False
  94.       Height          =   288
  95.       Left            =   960
  96.       TabIndex        =   3
  97.       Top             =   960
  98.       Width           =   4692
  99.    End
  100.    Begin VB.TextBox txtFolder 
  101.       Enabled         =   0   'False
  102.       Height          =   288
  103.       Left            =   960
  104.       TabIndex        =   2
  105.       Top             =   600
  106.       Width           =   4692
  107.    End
  108.    Begin DPDLGLib.DPDlg dpdMain 
  109.       Left            =   4800
  110.       Top             =   3000
  111.       _Version        =   65536
  112.       _ExtentX        =   677
  113.       _ExtentY        =   677
  114.       _StockProps     =   2
  115.       Caption         =   "Select A Folder"
  116.    End
  117.    Begin VB.Image imgIcon 
  118.       Height          =   492
  119.       Left            =   5160
  120.       Top             =   1560
  121.       Width           =   492
  122.    End
  123.    Begin VB.Label lblIcon 
  124.       Caption         =   "Icon:"
  125.       Height          =   252
  126.       Left            =   4440
  127.       TabIndex        =   15
  128.       Top             =   1680
  129.       Width           =   492
  130.    End
  131.    Begin VB.Label lblRoot 
  132.       Caption         =   "&Root:"
  133.       Height          =   252
  134.       Left            =   4440
  135.       TabIndex        =   14
  136.       Top             =   2400
  137.       Width           =   492
  138.    End
  139.    Begin VB.Label lblCaption 
  140.       Caption         =   "Caption:"
  141.       Height          =   252
  142.       Left            =   120
  143.       TabIndex        =   12
  144.       Top             =   240
  145.       Width           =   732
  146.    End
  147.    Begin VB.Label lblPath 
  148.       Caption         =   "Path:"
  149.       Height          =   252
  150.       Left            =   120
  151.       TabIndex        =   1
  152.       Top             =   960
  153.       Width           =   732
  154.    End
  155.    Begin VB.Label lblFolder 
  156.       Caption         =   "Folder:"
  157.       Height          =   252
  158.       Left            =   120
  159.       TabIndex        =   0
  160.       Top             =   600
  161.       Width           =   732
  162.    End
  163. Attribute VB_Name = "frmMain"
  164. Attribute VB_GlobalNameSpace = False
  165. Attribute VB_Creatable = False
  166. Attribute VB_PredeclaredId = True
  167. Attribute VB_Exposed = False
  168. Private Sub chkBFC_Click()
  169.     If chkBFC.Value = 1 Then
  170.         dpdMain.BrowseForComputer = True
  171.     Else
  172.         dpdMain.BrowseForComputer = False
  173.     End If
  174. End Sub
  175. Private Sub chkBFP_Click()
  176.     If chkBFP.Value = 1 Then
  177.         dpdMain.BrowseForPrinter = True
  178.     Else
  179.         dpdMain.BrowseForPrinter = False
  180.     End If
  181. End Sub
  182. Private Sub chkDGBD_Click()
  183.     If chkDGBD.Value = 1 Then
  184.         dpdMain.DontGoBelowDomain = True
  185.     Else
  186.         dpdMain.DontGoBelowDomain = False
  187.     End If
  188. End Sub
  189. Private Sub chkRFSA_Click()
  190.     If chkRFSA.Value = 1 Then
  191.         dpdMain.ReturnFSAncestors = True
  192.     Else
  193.         dpdMain.ReturnFSAncestors = False
  194.     End If
  195. End Sub
  196. Private Sub chkROFSD_Click()
  197.     If chkROFSD.Value = 1 Then
  198.         dpdMain.ReturnOnlyFSDirs = True
  199.     Else
  200.         dpdMain.ReturnOnlyFSDirs = False
  201.     End If
  202. End Sub
  203. Private Sub cmdClose_Click()
  204.     End
  205. End Sub
  206. Private Sub cmdShow_Click()
  207.     ' Set the caption to that given by the user
  208.     dpdMain.Caption = txtCaption.Text
  209.     ' Get the root from the combo box
  210.     dpdMain.Root = cmboRoot.ListIndex
  211.     ' Very Important! Makes Browse dialog modal for this application's window
  212.     dpdMain.hWnd = frmMain.hWnd
  213.     ' Show the dialog box
  214.     If (dpdMain.Show) Then
  215.         
  216.         ' If Show returns TRUE then everything went OK, so display the folder
  217.         '   and path
  218.         txtFolder.Text = dpdMain.Folder
  219.         txtPath.Text = dpdMain.Path
  220.         imgIcon.Picture = dpdMain.Icon
  221.         
  222.     End If
  223. End Sub
  224. Private Sub Form_Load()
  225.     ' Setup the design time options
  226.     chkBFC.Value = IIf(dpdMain.BrowseForComputer, 1, 0)
  227.     chkBFP.Value = IIf(dpdMain.BrowseForPrinter, 1, 0)
  228.     chkDGBD.Value = IIf(dpdMain.DontGoBelowDomain, 1, 0)
  229.     chkRFSA.Value = IIf(dpdMain.ReturnFSAncestors, 1, 0)
  230.     chkROFSD.Value = IIf(dpdMain.ReturnOnlyFSDirs, 1, 0)
  231.     cmboRoot.ListIndex = dpdMain.Root
  232.     txtCaption.Text = dpdMain.Caption
  233. End Sub
  234. Private Sub Image1_Click()
  235. End Sub
  236.